{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "World Projections\n",
    "-----------------\n",
    "This example shows a map of the countries of the world using four available\n",
    "geographic projections. For more details on the projections available in\n",
    "Altair, see https://vega.github.io/vega-lite/docs/projection.html\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# category: geographic\n",
    "\n",
    "import altair as alt\n",
    "alt.data_transformers.enable('json')\n",
    "from vega_datasets import data\n",
    "\n",
    "countries = alt.topo_feature(data.world_110m.url, 'countries')\n",
    "\n",
    "base = alt.Chart(countries).mark_geoshape(\n",
    "    fill='#666666',\n",
    "    stroke='white'\n",
    ").properties(\n",
    "    width=300,\n",
    "    height=180\n",
    ")\n",
    "\n",
    "projections = ['equirectangular', 'mercator', 'orthographic', 'gnomonic']\n",
    "charts = [base.project(proj).properties(title=proj)\n",
    "          for proj in projections]\n",
    "\n",
    "alt.vconcat(\n",
    "    alt.hconcat(*charts[:2]),\n",
    "    alt.hconcat(*charts[2:])\n",
    ")\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "env": {},
   "interrupt_mode": "signal",
   "language": "python",
   "metadata": {},
   "name": "python3"
  },
  "language": "python"
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
